/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       displaylist.h
 * Author:     karooolek
 * Created on: 2010-05-30
 *
 **********************************************************************************************************************/

#ifndef DISPLAYLIST_H_
#define DISPLAYLIST_H_

#define DISPLAY_LIST(code)                         \
    {                                            \
        static uint dl = 0;                        \
        if(!dl)                                    \
        {                                        \
            dl = glGenLists(1);                    \
            glNewList(dl, GL_COMPILE);            \
            code                                \
            glEndList();                        \
        }                                        \
        glCallList(dl);                            \
    }                                            

#endif // DISPLAYLIST_H_
